<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            height:100px;
            width:100px;
            
        }
        .d1 {   
            background-color: red;
            padding:10px;
            border:4px groove rgb(243, 242, 242);
            margin:10px;
            box-sizing: content-box;
        }
        .d2 {
            background-color: green;
            margin:0 auto;
        }
        .d3 {
            background-color: yellow;
            margin-left:-50px;
        }
    </style>
</head>
<body>
    <div class="d1">1</div>
    <div class="d2">2</div>
    <div class="d3">3</div>
</body>
</html>